#ifndef DEVICESTATUS_H
#define DEVICESTATUS_H

#include <QMainWindow>
#include <QUdpSocket>
#include <convert.h>
#include <QHash>

namespace Ui
{
class DeviceStatus;
}

class DeviceStatus : public QMainWindow
{
    Q_OBJECT
    /*
    public:
        struct __dataFrame {
            unsigned char StatuCode;
            qint16 Reserve;
            qint16 NodeIndex;
        };
        typedef __dataFrame DataFrame;
    */
public:
    explicit DeviceStatus(QWidget *parent = 0);
    ~DeviceStatus();

private:
    void initialize();
    void readConfigrateFile(QString filename);
    void parseConfigrate();
    void parseAWXConfigrate();

private slots:
    void on_pushButton_File_clicked();
    void on_pushButton_Listen_clicked();
    void on_socketRecive();

private:
    Ui::DeviceStatus *ui;
    QUdpSocket socket;
    QHash<int, QString> decode;
};

#endif // DEVICESTATUS_H
